package com.wtwd.device.constant;

public enum UserTypeEnum {
    TOURIST(0), PHONE(1), EMAIL(2);

    private int type;

    UserTypeEnum(int type) {
        this.type = type;
    }

    public int getType() {
        return type;
    }

    public static UserTypeEnum getUserType(int type) {
        for (UserTypeEnum value : UserTypeEnum.values()) {
            if (value.type == type) {
                return value;
            }
        }
        return null;
    }

}
